package com.heima.utils.thread;

import com.heima.model.admin.pojos.AdUser;

/**
 * @author shiminghui
 * @date 2024/12/17 20:19
 * @description: TODO
 */
public class AdminUserThreadLocal {
    private static final ThreadLocal<AdUser> ADMIN_USER_THREAD_LOCAL = new ThreadLocal<>();

    public static AdUser getUser() {
        return ADMIN_USER_THREAD_LOCAL.get();
    }

    public static void setUser(AdUser adUser) {
        ADMIN_USER_THREAD_LOCAL.set(adUser);
    }

    public static void remove() {
        ADMIN_USER_THREAD_LOCAL.remove();
    }
}
